package ejbPart.entity.bankAccount;

import exceptions.AccountException;
import javax.ejb.EJBLocalObject;
import java.rmi.RemoteException;

public interface AccountLocal extends EJBLocalObject {
    /**
     * Deposit amt to the bank account.
     *
     * @param amt amount of deposited money
     * @throws javax.security.auth.login.AccountException
     * @throws java.rmi.RemoteException
     */
    public void deposite(double amt) throws AccountException;

    /**
     * Withdraw amt from bank account
     *
     * @param amt
     * @throws AccountException in case when amt < available balance
     * @throws RemoteException
     */
    public void withdraw(double amt) throws AccountException;


        /* Bunch of getter and setter methods designed to work with information that entity bean represent */

    // Getter methods of the entity bean
    public double getBalance();
    public String getOwnerName();
    public String getAccountId();

    // Setter methods of the entity bean
    public void setOwnerName(String name);
    public void setAccountId(String id);
}
